class Solution(object):
    def setZeroes(self, matrix):
        """
        :type matrix: List[List[int]]
        :rtype: void Do not return anything, modify matrix in-place instead.
        """
        nRow = len(matrix)
        nCol = len(matrix[0])
        tmp = [[1 for _ in range(nCol)] for _ in range(nRow)]
        for r in range(nRow):
            for c in range(nCol):
                if matrix[r][c]==0:
                    for rr in range(nRow):
                        tmp[rr][c]=0
                    for cc in range(nCol):
                        tmp[r][cc]=0
        for r in range(nRow):
            for c in range(nCol):
                if tmp[r][c]==0:
                    matrix[r][c]=0